<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<link rel="stylesheet" type="text/css" href="<%=basePath%>resources/easyui/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>resources/easyui/themes/icon.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>resources/css/icon.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>resources/css/uims.css" />
<script type="text/javascript" src="<%=basePath%>resources/easyui/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>resources/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath%>resources/easyui/locale/easyui-lang-zh_CN.js"></script>
<link rel="Shortcut Icon" href="<%=basePath%>resources/images/icons/favicon.ico" type="image/x-icon" />
<link rel="icon" href="<%=basePath%>resources/images/icons/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=basePath%>resources/common/dataGridCellTip.js"></script>

<script type="text/javascript">	
	//弹出信息窗口 title:标题 msgString:提示信息 msgType:信息类型 [error,info,question,warning]
	function msgShow(title, msgString, msgType) {
		$.messager.alert(title, msgString, msgType);
	}
	function noSelectData(){
		msgShow('系统提示','请选择需要操作的记录!','info');
	}
	function sysMsgShow(msgString){
		msgShow('系统提示',msgString,'info');
	}
	function sysErrorShow(msgString){
		msgShow('系统提示',msgString,'error');
	}
	/**设置jquery的ajax全局请求参数 */ 
  	$.ajaxSetup({
  		contentType:"application/x-www-form-urlencoded;charset=utf-8",
        //timeout:5,
        cache:false,
        dataFilter:function(data,dataType){
        	if(data=="9998")
        	{
        		$.messager.alert('温馨提醒', 'session超时,请重新登录!', "info", function () {
	            	window.parent.location.href="<%=basePath%>";
	        	});
        	}
        	else if(data=="9999")
        	{
        		$.messager.alert('温馨提醒', '请勿非法操作!', "info");
        	}
        	return data;
        }
  	});
</script>
<%
 if(session.getAttribute("loginUser")==null){
%>
<script language="JavaScript" type="text/JavaScript">
     $(function () {
    	$("body").eq(0).html("");
        $.messager.alert('温馨提醒', 'session超时,请重新登录!', "info", function () {
            window.parent.location.href="<%=basePath%>";
        });
    }); 
</script>
<%}%>
